extends PlayStatusInterface

# 物理桢，处理碰撞的逻辑
func run_physics_process(_delta):
	var collision_info = owner.move_and_collision_info()
	if collision_info.get("is_on_floor"):
		if owner.velocity.x == 0:
			manage_node.to_idle()
		else:
			manage_node.to_walk()
		return
	
	# 墙上时刻
	if collision_info.get("was_on_wall") && not collision_info.get("is_on_wall"):
		manage_node.to_fall()
			
# 逻辑桢，处理画面的逻辑
func run_process(delta):	
	if owner.can_jump_from_wall() > 0:
		manage_node.to_jump()
		return 
	else:
		owner.slide_on_wall()
		if owner.is_not_on_wall():
			manage_node.to_idle()
	
	owner.show_animiation("onwall")
